import http from './http';

// 按需导出API  /index/index
export const GetHomeDataApi = () => http.get('/index/index');

// 进入popup时的请求，获取历史记录和热门搜索
export const GetHistoryHotApi = () => http.get('/search/index');

// 实时搜索功能
export const GoSearchApi = (params) => http.get('/search/helper', { params });

// 
export const SearchProductsApi = (params) => http.get('/goods/list', { params });

// 专题
export const GetTopicDataApi = (params) => http.get('/topic/list', { params });

// 产品明细
export const GoodsDetailApi = (params) => http.get('/goods/detail', { params });

// 相关产品
export const GetAlllookApi = (params) => http.get('/goods/related', { params });

// 分类页列表
export const GetCatelogDataApi = (params) => http.get('/catalog/index', { params });
export const GetCurrentDataApi = (params) => http.get('/catalog/current', { params });

export const GetChannelDataApi = (params) => http.get('/goods/category', { params });

// 品牌制造商详情
export const GetBrandDetailApi = (params) => http.get('/brand/detail', { params });

// 我的页
export const LoginApi = (params) => http.post('/auth/loginByWeb', params)

// 购物栏
export const GoodsCountApi = () => http.get('/cart/goodscount');

// 清除历史记录
export const ClearHistoryApi = (params) => http.post('/search/clearhistory', params);


// 加入购物车
export const AddToCartApi = (params) => http.post('/cart/add', params);

// 购物车数据
export const GetCartDataApi = (params) => http.get('/cart/index', { params });

// 点击切换商品选中状态（含全选）
export const CartCheckedApi = (params) => http.post('/cart/checked', params);

// 商品步进器
export const StepChangeApi = (params) => http.post('/cart/update', params);

// 删除商品
export const CartDelApi = (params) => http.post('/cart/delete', params);

